<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition >
            <p:panel >
                <h:panelGrid columns="1" >
                    <p:commandButton value="Novo Insert" 
                                     icon="iconNovo"
                                     id="btnNovo"
                                     action="#{anjoBean.novo()}"
                                     update=":geral:pnlProcesso"/>

                </h:panelGrid>
            </p:panel>

            <br/>

            <p:dataTable id="dtAnjo" var="anjo" value="#{anjoBean.anjos}"
                         paginator="true" rows="5"
                         paginatorPosition="top"
                         style="width: auto; height: auto"
                         emptyMessage="Sem Registros">

                <f:facet name="header">
                    <h:outputText value="Lista de Anjos"/>
                </f:facet>

                <p:column headerText="Nome">
                    <h:outputText value="#{anjo.nome}"/>
                </p:column>

                <p:column headerText="Apelido">
                    <h:outputText value="#{anjo.apelido}"/>
                </p:column>
                <p:column headerText="e-mail">
                    <h:outputText value="#{anjo.email}"/>
                </p:column>
                <p:column headerText="Telefone">
                    <h:outputText value="#{anjo.telefone}"/>
                </p:column>
            </p:dataTable>

        </ui:composition>

    </body>
</html>
